<%@ page import="com.dx.util.JdbcUtil" %>
<%@ page import="java.sql.ResultSet" %><%--
  Created by IntelliJ IDEA.
  User: Admin
  Date: 2024/1/11
  Time: 0:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
欢迎：
<hr/>
<table>
    <tr>
        <th>ID</th>
        <th>标题</th>
        <th>内容</th>
        <th>图片链接</th>
        <th>视频连接</th>
        <th>创建时间</th>
        <th>创建人</th>
        <th>更新时间</th>
        <th>更新人</th>
        <th>文章类型</th>
        <th>是否热门</th>
        <th>点击量</th>
        <th>操作</th>
    </tr>
    <%
        String sql="select * from tb_news ";
        JdbcUtil util=new JdbcUtil();
        ResultSet rs=util.executeQuery(sql,null);
        if (rs!=null){
        while(rs.next()){
    %>
    <tr>
        <td><%=rs.getInt("id")%></td>
        <td><%=rs.getString("title")%></td>
        <td><%=rs.getInt("content ")%></td>
        <tb><%=rs.getString("img_url ")%></tb>
        <tb><%=rs.getString("vedio_url ")%></tb>
        <tb><%=rs.getString("create_time")%></tb>
        <tb><%=rs.getString("create_user")%></tb>
        <tb><%=rs.getString("update_time")%></tb>
        <tb><%=rs.getString("update_user")%></tb>
        <tb><%=rs.getString("type")%></tb>
        <tb><%=rs.getString("is_hot ")%></tb>
        <tb><%=rs.getString("clicks")%></tb>
    </tr>
    <%
            }
        }
        util.release();
    %>
</table>
</body>
</html>
</body>
</html>
